home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10309 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: dish.news.pipex.net!pipex!bt!usenet
  2. From: dathomas@tymnet.bt.co.uk (David 'Alwyn' Thomas)
  3. Newsgroups: comp.lang.c++
  4. Subject: basic_string and STL
  5. Date: 7 Mar 1996 15:49:13 GMT
  6. Organization: BT London Software Engineering Centre at City Forum
  7. Message-ID: <4hn0hp$eqp@pheidippides.axion.bt.co.uk>
  8. References: <313F0353.41C67EA6@pia.bt.co.uk>
  9. NNTP-Posting-Host: 147.150.193.214
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13.  
  14.  
  15. When I try to use container classes using string, I then to get compiler
  16. errors complaining of various ambiguous function declarations in
  17. basic_string; the offenders are certain relational operators, as shown
  18. by the following example.
  19.  
  20. In file included from /usr/local/lib/g++-include/std/bastring.h:571,
  21.                  from /usr/local/lib/g++-include/std/string.h:6,
  22.                  from /usr/local/lib/g++-include/string:5,
  23.                  from test.cc:5:
  24. /usr/local/lib/g++-include/std/sinst.h:60: ambiguous template
  25. instantiation for `operator !=(const char *, const
  26. basic_string<char,string_char_traits<char> > &)' requested
  27.  
  28. etc.
  29.  
  30. Has anyone seen this before? Is it a general fault with string and STL,
  31. or is it rather to do with shortcomings in g++?
  32.  
  33.  
  34. Alwyn
  35.  
  36.  
  37.  
  38.